Software is typically written in a high-level language, and then compiled into machine-readable language, or native instructions, for execution by a processor. A virtual machine may assist in compiling the high level language. As part of the compiling process, the various functions of the software may be mapped to particular modules of the processor for execution. This approach for processor programming may be adequately efficient for programming of a single processor or a device comprising a symmetric multi-processor platform, but may not be a particularly efficient approach for programming a device with multiple heterogeneous processing elements such as a network processor.
Programming a multi-core processor such as a network processor may entail making determinations such as which processor core will execute particular modules, and may require the programmer to make determinations concerning partitioning of functions, and how best to utilize each processing core. This may cause programming a multi-core processor to be burdensome and complex, as well as making the use of available processing resources less efficient. A need exists, therefore, for an improved method of writing code, and a virtual machine including the capability to use processor. resources more efficiently.